#ifndef OBJC_COMMAND_H
#define OBJC_COMMAND_H

#include <sobjc-commons/port.h>
#include <sobjc-commons/str_list.h>

typedef struct objc_opt_list    objc_opt_list, *objc_opt_list_t;

enum OBJC_CC {
  OBJC_CC_GCC
};

struct objc_opt_list {
  int cc;
  int phase;
  int verbose;
  int cc_verbose;
  int debug;
  int profile;
  int does_link;
  int does_asm;
  int does_compile;
  int does_translate;
  int saves_temps;
  int links_static; 
  int links_baustein;
  char *output;
  objc_str_list_t load_paths;
  objc_str_list_t libs;
  objc_str_list_t lib_paths;
  int optimize_lv;
  int ansi;
  objc_str_list_t flags;
  objc_str_list_t compiler_opts;

  /* Warning options */
  int syntax_only;
  int w_pedantic;
  int pedantic_errors;
  int no_warn;
  objc_str_list_t warns;

  /* Objective-C options */
  char *cstr_class;
  int no_nil_recvs;
  int gen_decls;
  int inline_cache;
  int dtable;
  int no_strict_msg;
  int w_no_protocol;
  int w_undeclared_sel;
  int w_strict_sel_match;

  /* positional arguments */
  int nfiles;
  char **files;
  int nargs;
  char **args;
};

extern char *objc_cmd;
extern objc_opt_list objc_main_opts;

void objc_parse_opts(int, char **);

void objc_print_verbose(const char *, ...);
void objc_print_error(const char *, ...);

int objc_invoke_cmd_verbose(objc_str_list_t);

#endif /* OBJC_COMMAND_H */
